#pragma once

#include <boost/function.hpp>
#include <boost/signal.hpp>

namespace rdc_transport
{
    typedef boost::function<void()> sessionEventDelegate;
    typedef boost::signal<void()> sessionSignal;

    class SessionWatcher
    {
    public:
        SessionWatcher(LPTSTR szAddinRGSName);
        ~SessionWatcher();

    public:
        void AddDisconnectHandler(sessionEventDelegate dalegate);
        void AddReconnectHandler(sessionEventDelegate dalegate);

    private:
        sessionSignal m_disconnect;
        sessionSignal m_reconnect;

        struct SesssionWatcherImpl;
        std::auto_ptr<SesssionWatcherImpl> pimpl;
    };
}
